package com.mhs.dataclassification.processSize;

import com.mhs.DTO.PlacemarkDTO;

public class ProcessSize_BenhVienDTO {
	public static int calculateSize_BenhVienDTO_Insert(PlacemarkDTO pmDTO) {
		int sizeRecord;
//		size int = 4 bytes
// 		mabvclient,mabv, tenbv, diachi, dienthoai, lat, lon, K, size, TS, TTL
		sizeRecord = 4 + 4 + sizeOfString(pmDTO.getName()) + sizeOfString(pmDTO.getAddress()) + sizeOfString(pmDTO.getFoneNumber())
				 + sizeOfString(pmDTO.getLatitude()) + sizeOfString(pmDTO.getLongitude()) 
				 + 4 + 4 + 8 + 4;
		return sizeRecord;	
	}
	
	private static int sizeOfString(String sValue){
		return sValue.getBytes().length;
	}
}
